package itdfq.dfq.Creational_Pattern.SingletonPattern;

import java.util.Stack;

/**
 * @Author GocChin
 * @Date 2021/3/22 20:14
 * @Blog: itdfq.com
 * @QQ: 909256107
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("18031210111   段方钦");
        StudentID num1,num2;
        num1= StudentID.getInstance();
        num2= StudentID.getInstance();
        System.out.println("学号是否一致："+(num1==num2));
        String str1,str2;
        str1=num1.getStudentCardNo();
        str2= num2.getStudentCardNo();
        System.out.println("第一次号码："+str1);
        System.out.println("第二次号码："+str2);
        System.out.println("内容是否相等："+str1.equals(str2));
        System.out.println("是否是相同的对象："+(str1==str2));



    }
}
